package io.datajek.springbasics.movierecommendersystem.lesson10;




import io.datajek.springbasics.movierecommendersystem.lesson7.Filter;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@ComponentScan(basePackages = "io.datajek.spring.basics.movierecommendersystem.lesson10")
@ComponentScan(includeFilters = @ComponentScan.Filter (
        type= FilterType.REGEX,
        pattern="io.datajek.spring.basics.movierecommendersystem.lesson9.*"))
        public class CollaborativeFilter implements Filter{
    public CollaborativeFilter(){
        super();
        System.out.println("collaborative filter constructor called");
    }


    public String[] getRecommendations(String movie) {

        return new String[] {"Finding Nemo", "Ice Age", "Toy Story" };
    }
}
